package net.ssta.util.bill.chargeobj;

import net.ssta.util.bill.UserBill;
import net.ssta.util.bill.UserBillException;

import org.apache.log4j.Logger;

public class UnitCharge implements ChargeInterface{
	private static Logger log = Logger.getLogger(UnitCharge.class.getClass()); 
	private String unitId;
	
	/**
	 * 
	 * @param _cgId
	 */
	public UnitCharge(String _unitId){
		unitId=_unitId;
	}
	
	/**
	 * 根据扣费对象的主键，来判断其所需的费用
	 * @param chargeId
	 * @return
	 */
	public int calCostNumber()throws UserBillException{
		return CostNumberConstants.getExpert();
	}
	
	/**
	 * 根据账单来扣费
	 * @param bill
	 * @throws UserBillException
	 */
	public String getChargeType(){
		return "unit";
	}
	
	public UserBill initBill(UserBill bill){
		bill.setInfoId(unitId);
		bill.setCType(this.getChargeType());
		return bill;
	}

}
